# include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define PI 3.1415926

int main(int argc ,char* args[]){
    char buf[128]; //开辟缓冲区
    float r,s; //定义变量,r：半径 s:面积
    if(argc!=2){
        //参数错误提示
        printf("Usage : %s radius!\n",args[0]);
        exit(1);
    }
    sscanf(args[1],"%f",&r); //从命令行参数获取半径
    s = PI*r*r; //计算面积
    sprintf(buf,"The surface of a circle with radius %.2f is %.2f\n",r,s); //输出到缓冲区
    puts(buf); //输出缓冲区内容到屏幕
    return 0;
}